<?php
namespace App\Modules\Adv;
use App\Modules\AdapterApi;
use App\Services\Adv\AdvIndex;
/**
 * Created by PhpStorm.
 * User: ws
 * Date: 20180612
 * 广告位分类
 */
class AdvClassify extends AdapterApi
{
    //添加广告位分类
    public function addAdvClassify(): array
    {
         $data = pick_array($this->postData, ['name', 'app_id','other_app_read', 'is_public', 'action','pid','order','description','status','add_user_id']);
       return AdvIndex::AdvClassify()->add($data);
    }
     //获取全部广告位分类 树状
    public function gainAdvClassifyList(): array
    {
         $data = pick_array($this->postData);
         return AdvIndex::AdvClassify()->classifyList($data);
    }
     //某条广告位分类编辑(修改)
    public function editAdvClassify(): array
    {
       $data = pick_array($this->postData, ["id", "name", "app_id", "other_app_read","is_public", "action", "pid", "order", "description", "status","add_user_id"]);
       return AdvIndex::AdvClassify()->edit($data);
    }
     //启用某个分类广告位分类
    public function enableAdvClassify(): array
    {
        $data = pick_array($this->postData, ['id']);
        return AdvIndex::AdvClassify()->classifyEnable($data);
    }
     //禁用某个分类广告位分类
    public function disableAdvClassify(): array
    {
        $data = pick_array($this->postData, ['id']);
        return AdvIndex::AdvClassify()->classifyDisable($data);
    }
      //删除某一广告位分类
    public function deleteAdvClassify(): array
    {
        $data = pick_array($this->postData, ['id']);
        return AdvIndex::AdvClassify()->classifyDelete($data);
    }
     //某一类广告位分类列表获取
    public function advClassifySomeList(): array
    {
        $data = pick_array($this->postData, ['pid','app_id']);
        return AdvIndex::AdvClassify()->classifySomeList($data);
    }
     //不同条件广告位分类列表获取 非删除 分类名称 描述
    public function advClassifyCondition(): array
    {
        $data = pick_array($this->postData, ['keywords','page','listRows']);
        return AdvIndex::AdvClassify()->classifyCondition($data);
    }
    //获取某一广告位分类详情
    public function classifyInfo(): array
    {
         $data = pick_array($this->postData, ['id']);
        return AdvIndex::AdvClassify()->classifyInfo($data);
    }

   
}